home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / hosts.equiv.z / hosts.equiv
Encoding:
Text File  |  2002-10-03  |  10.9 KB  |  265 lines

  1.  
  2.  
  3.  
  4. HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))                                                  HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      hosts.equiv, rhosts - trusted hosts by system and by user
  10.  
  11. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  12.      The remote login and shell servers use an authentication scheme based on
  13.      ``trusted hosts.''  The /_e_t_c/_h_o_s_t_s._e_q_u_i_v file contains a list of hosts
  14.      that are considered trusted and under the same administrative control.
  15.      When an _r_l_o_g_i_n(1C), _r_c_p(1C), _r_d_i_s_t(1C), or _r_s_h(1C) request is received
  16.      from a host listed in _h_o_s_t_s._e_q_u_i_v and when the targeted user account is
  17.      listed in the /_e_t_c/_p_a_s_s_w_d file, then the remote access is allowed with no
  18.      further checking.  In this case, _r_l_o_g_i_n does not prompt for a password,
  19.      and _r_c_p, _r_d_i_s_t, and _r_s_h complete successfully.  Thus, a remote user with
  20.      a local user ID is said to have ``equivalent'' access from a remote host
  21.      named in _h_o_s_t_s._e_q_u_i_v.  Users may expand this "equivalence" of machines by
  22.      installing a ._r_h_o_s_t_s file in their login directory.  The _r_o_o_t login
  23.      bypasses the /_e_t_c/_h_o_s_t_s._e_q_u_i_v file and uses only _r_o_o_t's (typically
  24.      /._r_h_o_s_t_s) file.
  25.  
  26.    TTTThhhheeee ////eeeettttcccc////hhhhoooossssttttssss....eeeeqqqquuuuiiiivvvv FFFFiiiilllleeee
  27.      The format of the _h_o_s_t_s._e_q_u_i_v files consists of one or more entries of
  28.      the form:
  29.  
  30.           _h_o_s_t_n_a_m_e [_u_s_e_r_n_a_m_e]
  31.  
  32.      where _h_o_s_t_n_a_m_e is the ``official'' fully-qualified name of a host as
  33.      listed in the _h_o_s_t_s(4) database.  The official name is the first name
  34.      given in the hosts database entry (and should include the domain name);
  35.      hostname aliases are not recognized. The domain portion of the hostname
  36.      is optional if the hostname's domain matches the one returned by
  37.      _g_e_t_h_o_s_t_n_a_m_e(_2) or _h_o_s_t_n_a_m_e(1).  If a host is a gateway, i.e., it has more
  38.      than 1 network interface, then an entry for the primary name and each
  39.      gateway name may be required.  The _h_o_s_t_n_a_m_e can be an IP address if the
  40.      IRIS can't translate a host's IP address into a name.  The _u_s_e_r_n_a_m_e field
  41.      is optional; if missing, the name of the remote user must match the local
  42.      username.  Spaces or tabs are used to separate the hostname from the
  43.      username.
  44.  
  45.      The _h_o_s_t_n_a_m_e field normally contains the name of a trusted host from
  46.      which a remote access can be made.  However, a hostname consisting of a
  47.      single `++++' indicates that all known hosts are to be trusted.  (Sites
  48.      connected to external networks such as the Internet should nnnnooootttt use `++++'.)
  49.      An entry consisting of a hostname prefixed with a minus sign (-) denies
  50.      access to any user from that host.  Remote access can also be given or
  51.      denied for all hosts within a specific network group (if the optional NIS
  52.      software has been enabled).  An entry of the form:
  53.  
  54.           ++++@@@@_g_r_o_u_p
  55.  
  56.      means that all hosts in the named network group are trusted.  An entry of
  57.      the form:
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))                                                  HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))
  71.  
  72.  
  73.  
  74.           ----@@@@_g_r_o_u_p
  75.  
  76.      means that all hosts in the group are not trusted; remote access is
  77.      denied to hosts in that group, except when an entry for a specific host
  78.      appears ahead of the ``minus'' group entry.
  79.  
  80.      The _u_s_e_r_n_a_m_e field can be used to specify a user who is allowed to log in
  81.      under aaaannnnyyyy valid user ID.  Careful thought about security should be given
  82.      before providing this privilege to a user.  You can also specify a
  83.      _u_s_e_r_n_a_m_e field with the form:
  84.  
  85.           ++++
  86.           ----_u_s_e_r_n_a_m_e
  87.           ++++@@@@_g_r_o_u_p_1
  88.           ----@@@@_g_r_o_u_p_2
  89.  
  90.      where ++++ means any user is allowed access to any account, and ----_u_s_e_r_n_a_m_e
  91.      means the specified user is denied access (except when previous entries
  92.      allow the specific user access).  The ++++@@@@ netgroup allows any user in
  93.      _g_r_o_u_p_1 to log in as anyone, and no one from _g_r_o_u_p_2 to log in at all.
  94.  
  95.    TTTThhhheeee UUUUsssseeeerrrr''''ssss ....rrrrhhhhoooossssttttssss FFFFiiiilllleeee
  96.      If none of the entries in /_e_t_c/_h_o_s_t_s._e_q_u_i_v give access to the user's
  97.      account, the user's ._r_h_o_s_t_s file is checked if the file exists.  If a
  98.      remote user is excluded by a minus entry from _h_o_s_t_s._e_q_u_i_v but included in
  99.      ._r_h_o_s_t_s, then that remote user is considered trusted and given access to
  100.      the local user's account.  The ._r_h_o_s_t_s file has the same format as the
  101.      _h_o_s_t_s._e_q_u_i_v file.  If an entry does not contain an explicit username, the
  102.      local user's name is implicitly used.
  103.  
  104.    TTTThhhheeee RRRRooooooootttt ....rrrrhhhhoooossssttttssss FFFFiiiilllleeee
  105.      When the remote user attempts to a remote access to the super-user
  106.      account, _r_o_o_t, only the /._r_h_o_s_t_s file is checked, not /_e_t_c/_h_o_s_t_s._e_q_u_i_v.
  107.      Special care should be taken in deciding the contents of _r_o_o_t's ._r_h_o_s_t_s
  108.      file.  Create _r_o_o_t's /._r_h_o_s_t_s only if all systems and their consoles are
  109.      physically secure and all privileged accounts have passwords.  Be
  110.      selective about the systems you add to the file.  Given access to a
  111.      console on a machine with /._r_h_o_s_t_s privileges, someone can log in as any
  112.      user, including the superuser, and become _r_o_o_t on any system that has
  113.      your system's name and _r_o_o_t in its /._r_h_o_s_t_s file.
  114.  
  115. NNNNOOOOTTTTEEEESSSS
  116.      The owner of the ._r_h_o_s_t_s file must be the super-user (i.e., _r_o_o_t) or the
  117.      user in whose home directory it resides.  The contents of a user's
  118.      ._r_h_o_s_t_s file will be disregarded if it is owned by another user or if its
  119.      permissions allow anyone who is not the owner to modify the file.  Use
  120.      the _c_h_m_o_d(1) command to add the proper protection:
  121.  
  122.           chmod  600  .rhosts
  123.  
  124.      Likewise, /_e_t_c/_h_o_s_t_s._e_q_u_i_v must be owned by and writable only by the
  125.      super-user.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))                                                  HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))
  137.  
  138.  
  139.  
  140.      If the user's home directory is NFS-mounted, the system daemons that try
  141.      to read the user's ._r_h_o_s_t_s file may fail if the NFS server treats uid 0
  142.      as ``nobody'' (see _e_x_p_o_r_t_s(_4)).  In this case, the permissions on the
  143.      directory and on the ._r_h_o_s_t_s file should allow read and search access by
  144.      anyone, so it may be located and read.
  145.  
  146.      If _r_s_h commands to your account on an IRIS with a ._r_h_o_s_t_s file fail with
  147.      ``permission denied'' errors, for example, it means you have used the
  148.      wrong hostname or the IRIS can't translate the remote host's IP address
  149.      into a name.  _R_l_o_g_i_n to the IRIS and use the hostname or IP address
  150.      contained in the REMOTEHOST environment variable as the hostname in your
  151.      ._r_h_o_s_t_s file.  The following will display the environment variable:
  152.  
  153.           echo $REMOTEHOST
  154.  
  155.      You must use the fully-qualified hostname of the remote system if the
  156.      IRIS's domain (as obtained from _h_o_s_t_n_a_m_e(_1) or _g_e_t_h_o_s_t_n_a_m_e(_2)) is missing
  157.      or not the same as the remote domain.
  158.  
  159.      The programs mentioned above use the _r_u_s_e_r_o_k(_3_N) library routine to grant
  160.      access based on the contents of these files.  Other programs, such as
  161.      _s_u(1M) also use this routine.
  162.  
  163. WWWWAAAARRRRNNNNIIIINNNNGGGG
  164.      The references to network groups (+@ and -@ entries) in _h_o_s_t_s._e_q_u_i_v and
  165.      ._r_h_o_s_t_s are only supported when the _n_e_t_g_r_o_u_p file is supplied by the NIS.
  166.  
  167.      Be sure to to place entries with restrictions for a host preceding
  168.      permissions for it; the effect of specifications is order-dependent.
  169.      Also, once a host is mentioned, it is no longer subject to default
  170.      action.  Hence, listing it once with a specific _u_s_e_r_n_a_m_e reference will
  171.      usually require an additional, following line which specifies the
  172.      handling for remaining users.
  173.  
  174. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  175.      The following ._r_h_o_s_t_s file for user _w_a_r_r_e_n on host _c_l_y_d_e._w_i_d_g_e_t_s._c_o_m
  176.  
  177.           +
  178.           +                     beatty
  179.           clyde                 +
  180.           bonnie.gadgets.com        faye
  181.           gate-bonnie.gadgets.com   faye
  182.  
  183.      permits the following users on the following hosts to access _w_a_r_r_e_n's
  184.      account on _c_l_y_d_e:
  185.        warren     any host
  186.        beatty     any host
  187.        any user   clyde.widgets.com
  188.        faye       bonnie.gadgets.com or gate-bonnie.gadgets.com
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))                                                  HHHHOOOOSSSSTTTTSSSS....EEEEQQQQUUUUIIIIVVVV((((4444))))
  203.  
  204.  
  205.  
  206. FFFFIIIILLLLEEEESSSS
  207.      /etc/hosts.equiv
  208.      /etc/passwd
  209.      ~/.rhosts
  210.  
  211. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  212.      rcp(1C), rdist(1C), rlogin(1C), rsh(1C), su(1M), rcmd(3N), ruserok(3N),
  213.      netgroup(4)
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.